/* -*- c++ -*- vim:set syntax=cpp: 
 *
 * NO INCLUDE GUARDS HERE.
 *
 * THIS FILE ONLY CHECKS AND DOES NOT DEFINE ANYTHING.
 *                                                                    
 * (C) 2009 Frank-Rene Schaefer                                         */

/* Validate */
#if defined(__QUEX_OPTION_BIG_ENDIAN) && defined(__QUEX_OPTION_LITTLE_ENDIAN)
#   error "Cannot define little endian and big endian at the same time."
#endif
#if ! defined(__QUEX_OPTION_BIG_ENDIAN) && ! defined(__QUEX_OPTION_LITTLE_ENDIAN)
#   error "Either little endian or big endian must be defined."
#endif

#if defined(QUEX_OPTION_ASSERTS) && defined (QUEX_OPTION_ASSERTS_DISABLED)
#   error "Ambiguous configuration options."
#endif

#if   ! defined(QUEX_OPTION_TOKEN_POLICY_QUEUE)  \
   && ! defined(QUEX_OPTION_TOKEN_POLICY_SINGLE)
#   error "No token policy specified."
#elif    defined(QUEX_OPTION_TOKEN_POLICY_QUEUE) \
      && defined(QUEX_OPTION_TOKEN_POLICY_SINGLE)
#   error "Both token policies 'queue' and 'single' specified, you must choose one!"
#endif

#if      defined(QUEX_OPTION_INDENTATION_TRIGGER) \
    && ! defined(QUEX_OPTION_TOKEN_POLICY_QUEUE)            \
    && ! defined(QUEX_OPTION_TOKEN_REPETITION_SUPPORT)

#   if defined(QUEX_OPTION_INDENTATION_DEFAULT_HANDLER)
#       error "Quex generated code: For default indentation handling, either '--token-policy queue' or token repetition support must be enabled."
#   elif ! defined(QUEX_OPTION_ERROR_INDENTATION_REQUIREMENT_DISABLED)
#       error "Quex generated code: For indentation handling, either '--token-policy queue' or token repetition support must be enabled. This error can be deactivated by defining compile macro QUEX_OPTION_ERROR_INDENTATION_REQUIREMENT_DISABLED."
#   endif

#endif

/* Disallow computed gotos if it is known that the compiler does not
 * support it.                                                       */
#if defined(QUEX_OPTION_COMPUTED_GOTOS)
#   if    defined(__GNUC__) \
       && ((__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 3))
#       error "Detected gcc version < 2.3; This version does not support computed gotos. Option QUEX_OPTION_COMPUTED_GOTOS cannot be used."
#   endif
#endif

#ifdef  QUEX_OPTION_BUFFER_BASED_ANALYZIS
#    if QUEX_SETTING_BUFFER_SIZE != 0
#       error "Buffer based analyzis has been activated but the macro QUEX_SETTING_BUFFER_SIZE is not set to zero. Buffer based analyzis relies on dynamically user defined memory."
#    endif
#    if QUEX_SETTING_BUFFER_MIN_FALLBACK_N != 0
#       error "Buffer based analyzis has been activated but the macro QUEX_SETTING_BUFFER_MIN_FALLBACK_N is not set to zero. Fallback regions are only interesting if buffer reload happens automatically. Buffer based analyzis relies on the user's buffer reloading."
#    endif
#endif

